#if !defined(AFX_DOWNLOADTHREAD_H__24233879_6DCB_47D4_A8DF_98A9CE095833__INCLUDED_)
#define AFX_DOWNLOADTHREAD_H__24233879_6DCB_47D4_A8DF_98A9CE095833__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DownloadThread.h : header file
//

#include <process.h>          // for _beginthread, _endthread


/////////////////////////////////////////////////////////////////////////////
// CDownloadThread thread

class CDownloadThread : public CWinThread
{
	DECLARE_DYNCREATE(CDownloadThread)
protected:
	          // protected constructor used by dynamic creation
	CString m_strResult;

// Attributes
public:
	CDownloadThread(); 

// Operations
public:
	CTime m_tStartTime;
	static unsigned __stdcall startDownloadFile(void * pThis);
	virtual void Delete();
	CString GetLastError();
	CString m_strLocalName;
	CString m_strRemoteName;
	DWORD m_dwTransferType;
	char m_szStatus[1024];
	CWnd *m_pTransferManager;
	CString m_strCurrentDirectory;
	double m_dwFileLength;

 	HANDLE m_hEventDead;
	HANDLE m_hEventKill;
	void KillThread();
  
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDownloadThread)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation
protected:
	void DownloadFile();
	virtual ~CDownloadThread();
	CFile m_File;

	// Generated message map functions
	//{{AFX_MSG(CDownloadThread)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DOWNLOADTHREAD_H__24233879_6DCB_47D4_A8DF_98A9CE095833__INCLUDED_)
